package xdu.ble.user.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import xdu.ble.common.utils.CookieUtils;
import xdu.ble.user.entity.Admin;
import xdu.ble.user.service.AdminService;

import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.websocket.server.PathParam;

/**
 * @Author com.alibaba.lizhen
 * @Date 2021/5/28 8:24 下午
 * @Version 1.0
 * @Description
 */
@RestController
@RequestMapping("/admin")
public class AdminController {

    private final Logger logger = LoggerFactory.getLogger(AdminController.class);


    @Autowired
    private AdminService adminService;

    /**
     * 登录
     * @return Result
     */
    @RequestMapping(value = "/login")
    public Admin login(@PathParam("phoneNum") String phoneNum, @PathParam("passWord") String passWord,
                       HttpServletRequest request, HttpServletResponse response) throws Exception{
        return adminService.login(phoneNum, passWord);
    }


}
